package com.gzsxy.esjy.bus.message;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author xiaolong
 * @version 1.0
 * @description: TODO
 * @date 2021/10/12 9:52
 */
@Getter
@Setter
@NoArgsConstructor
public class InnerProtocol {

    /**
     * @description: 内部命令
     */
    private String cmd;

    /**
     * @description: 跳过后缀
     */
    private int strip = 0;

    /**
     * @description: 报文体
     */
    private Object body;


    public InnerProtocol cmd(String cmd) {
        this.cmd = cmd;
        return this;
    }

    public InnerProtocol body(Object body) {
        this.body = body;
        return this;
    }

    public InnerProtocol strip(int i) {
        this.strip = i < 0 ? 0 : i;
        return this;
    }
}
